Cloud-native global file system with reshapable caching

ABSTRACT

A cloud-native global file system in which a local filer creates objects and forward them to a cloud-based object store is augmented to include a reshapable caching scheme for the local filer. Like striped caches, the approach uses a stripe, but the striping is implemented via a true RAID 0 (disk striping) rather than as a striped LV (logical volume) device. This approach allows for a “reshape” operation to convert from a n-way stripe set to a n+1-way stripe set. Preferably, a reshape involves redistributing each block on disk to its new calculated home. For example, going from a single disk to a two disk set would move every other block from disk 1 to disk 2, and rearrange the blocks on disk 1 to fill in the “holes”. Performance after the reshape matches that of a striped cache. In one embodiment, the cache is structured as a “degraded” RAID 4.

BACKGROUND OF THE INVENTION Technical Field

This application relates generally to data storage.

Background of the Related Art

It is known to provide a cloud-native global file system that is used toprovide primary file storage for enterprise data. In this approach, edgeappliances (or “filers”) typically located on-premises securely transmitall files, file versions and metadata to a preferred private or publiccloud object store, while locally caching only active files. Theappliances are stateless, and multiple appliances can mount the samevolume in the cloud. As files are written locally, an authoritative copyof every file and metadata (inodes) are stored in the cloud. The systemprovides a single, unified namespace for all primary file data that isnot bound by local hardware or network performance constraints. Theabove-described approach to enterprise file services also has beenextended to provide multiple-site/multiple-filer access to the samenamespace, thereby enabling participating users with the ability tocollaborate on documents across multiple filers/sites. A system of thistype is available commercially from Nasuni® Corporation of Boston, Mass.

A filer in the above-described system typically includes a local cachethat is managed across a set of drives. In one caching scheme, thedrives are striped. Striping means that individual disk chunks (the“stripe size”) are arranged to spread out data across all of the disks,such that the first block lives on the first disk, the second blocklives on the second disk, and so on. Disk striping is sometimes referredto as a RAID 0 scheme. RAID refers to a redundant array of independentdisks. This approach allows the system to operate irrespective of anysingle-disk size cache limit, and striping facilitates performanceimprovement as multiple cache disks can be interacted with concurrently.For example, if blocks 0-3 are being read and there is a 4 disk stripeset, all 4 blocks can be read concurrently. The operating system kernelknows the dimensions (sometimes called the “shape”) of the stripe set,and it automatically schedules concurrent reads across the variousdevices to maximize performance. The local filesystem is also aware ofthe RAID shape, and it arranges its internal data structures to spreadout across the stripe set and not concentrate frequently-accessed datastructures on a single device, to avoid creating a hot spot, which wouldnegatively impact performance. Overall performance is ideally that ofall disks taken together (though somewhat lower in practice), as alldisks contribute to the overall I/O.

While the striping approach has advantages (e.g., new devices can beadded, existing devices can be expanded, improved performance over asingle cache disk or a set of scalable cache disks, etc.), there arealso drawbacks. In particular, while existing devices can be expanded atany time, up until the hypervisor limit, all disks of the stripe setmust be equally expanded to be useful. For example, a three-disk stripeset where two of the disks are 4 TB and one of the disks is 6 TB resultsin a 12 TB cache and not a 14 TB cache, as 2 TB of the 6 TB disk cannotbe used. Another drawback is that all new devices must be added inmultiples of the stripe width. So, if the cache starts with a 3-diskstripe set, new devices must be added in units of 3. Most significantly,because the filesystem needs to be aware of the cache shape in order tolay out the internal data structures, the final striping step is toformat the cache. This means the only way to stripe an existing filer isto either delete the cache or to perform disaster recovery (DR). Afurther problem is that filer must be offline during the stripeoperation.

BRIEF SUMMARY

According to this disclosure, a new type of caching scheme isimplemented, referred to as “reshapable” caching. Like striped caches,the approach uses a stripe, but the striping is implemented via a trueRAID 0 rather than as a striped LV (logical volume) device. RAID 0 (diskstriping) is the process of dividing a body of data into blocks andspreading the data blocks across multiple storage devices, such as harddisks or solid-state drives (SSDs), in a redundant array of independentdisks (RAID) group. A stripe consists of the data divided across the setof hard disks or SSDs, and a striped unit refers to the data slice on anindividual drive. This approach allows for a “reshape” operation toconvert from a n-way stripe set to a n+l-way stripe set. Preferably, areshape involves redistributing each block on disk to its new calculatedhome. For example, going from a single disk to a two disk set would moveevery other block from disk 1 to disk 2, and rearrange the blocks ondisk 1 to fill in the “holes”. Performance after the reshape matchesthat of a striped cache.

In one embodiment, the approach herein takes advantage of the fact thatRAID 4 (being several disks of striped data, plus one disk of paritydata used to reconstruct the RAID array in case of disk failure) can beconsidered a RAID 0 (the aforementioned “several disks of striped data”)plus a parity disk. A RAID 4 missing its parity disk (a “degraded” RAID4) has the same characteristics as a RAID 0, and for all intents andpurposes can be treated as a RAID 0. This allows for simple reshapeoperations; in particular, while reshaping a RAID 0 is not alwayssupported by commercial RAID implementations, reshaping a RAID 4 is morefrequently supported.

The foregoing has outlined some of the more pertinent features of thesubject matter. These features should be construed to be merelyillustrative. Many other beneficial results can be attained by applyingthe disclosed subject matter in a different manner or by modifying thesubject matter as will be described.

BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of the present invention and theadvantages thereof, reference is now made to the following descriptionstaken in conjunction with the accompanying drawings, in which:

FIG. 1 is a block diagram illustrating how a known versioned file systeminterfaces a local file system to an object-based data store;

FIG. 2 is a block diagram of a representative implementation of aportion of the interface shown in FIG. 1;

FIG. 3 is a more detailed implementation of the interface where thereare a number of local file systems of different types;

FIG. 4 illustrates the interface implemented as an appliance within alocal processing environment;

FIG. 5 describes further details of a versioned file system in which thetechniques of this disclosure may be implemented;

FIG. 6 depicts a reshapable caching technique of this disclosure.

DETAILED DESCRIPTION

FIG. 1 illustrates a local file system 100 and an object-based datastore 102. Although not meant to be limiting, preferably theobject-based data store 102 is a “write-once” store and may comprise a“cloud” of one or more storage service providers. An interface 104 (or“filer”) provides for a “versioned file system” that only requireswrite-once behavior from the object-based data store 102 to preservesubstantially its “complete” state at any point-in-time. As used herein,the phrase “point-in-time” should be broadly construed, and it typicallyrefers to periodic “snapshots” of the local file system (e.g., onceevery “n” minutes). The value of “n” and the time unit may be varied asdesired. The interface 104 provides for a file system that has completedata integrity to the cloud without requiring global locks. Inparticular, this solution circumvents the problem of a lack of reliableatomic object replacement in cloud-based object repositories. Theinterface 104 is not limited for use with a particular type of back-enddata store. When the interface is positioned in “front” of a data store,the interface has the effect of turning whatever is behind it into a“versioned file system” (“VFS”). The VFS is a construct that is distinctfrom the interface itself, and the VFS continues to exist irrespectiveof the state or status of the interface (from which it may have beengenerated). Moreover, the VFS is self-describing, and it can be accessedand managed separately from the back-end data store, or as a componentof that data store. Thus, the VFS (comprising a set of structured datarepresentations) is location-independent. In one embodiment, the VFSresides within a single storage service provider (SSP) although, asnoted above, this is not a limitation. In another embodiment, a firstportion of the VFS resides in a first SSP, while a second portionresides in a second SSP. Generalizing, any given VFS portion may residein any given data store (regardless of type), and multiple VFS portionsmay reside across multiple data store(s). The VFS may reside in an“internal” storage cloud (i.e. a storage system internal to anenterprise), an external storage cloud, or some combination thereof.

The interface 104 may be implemented as a machine. A representativeimplementation is the Nasuni® Filer, available from Nasuni® Corporationof Boston, Mass. Thus, for example, typically the interface 104 is arack-mounted server appliance comprising hardware and software. Thehardware typically includes one or more processors that execute softwarein the form of program instructions that are otherwise stored incomputer memory to comprise a “special purpose” machine for carrying outthe functionality described herein. Alternatively, the interface isimplemented as a virtual machine or appliance (e.g., via VMware®, or thelike), as software executing in a server, or as software executing onthe native hardware resources of the local file system. The interface104 serves to transform the data representing the local file system (aphysical construct) into another form, namely, a versioned file systemcomprising a series of structured data representations that are usefulto reconstruct the local file system to any point-in-time. Arepresentative VFS is the Nasuni Unity File System (UniFS™). Althoughnot meant to be limiting, preferably each structured data representationis an XML document (or document fragment). As is well-known, extensiblemarkup language (XML) facilitates the exchange of information in a treestructure. An XML document typically contains a single root element (ora root element that points to one or more other root elements). Eachelement has a name, a set of attributes, and a value consisting ofcharacter data, and a set of child elements. The interpretation of theinformation conveyed in an element is derived by evaluating its name,attributes, value and position in the document.

The interface 104 generates and exports to the write-once data store aseries of structured data representations (e.g., XML documents) thattogether comprise the versioned file system. The data representationsare stored in the data store. Preferably, the XML representations areencrypted before export to the data store. The transport may beperformed using known techniques. In particular, REST (RepresentationalState Transfer) is a lightweight XML-based protocol commonly used forexchanging structured data and type information on the Web. Another suchprotocol is Simple Object Access Protocol (SOAP). Using REST, SOAP, orsome combination thereof, XML-based messages are exchanged over acomputer network, normally using HTTP (Hypertext Transfer Protocol) orthe like. Transport layer security mechanisms, such as HTTP over TLS(Transport Layer Security), may be used to secure messages between twoadjacent nodes. An XML document and/or a given element or object thereinis addressable via a Uniform Resource Identifier (URI). Familiarity withthese technologies and standards is presumed.

FIG. 2 is a block diagram of a representative implementation of how theinterface captures all (or given) read/write events from a local filesystem 200. In this example implementation, the interface comprises afile system agent 202 that is positioned within a data path between alocal file system 200 and its local storage 206. The file system agent202 has the capability of “seeing” all (or some configurable set of)read/write events output from the local file system. The interface alsocomprises a content control service (CCS) 204 as will be described inmore detail below. The content control service is used to control thebehavior of the file system agent. The object-based data store isrepresented by the arrows directed to “storage” which, as noted above,typically comprises any back-end data store including, withoutlimitation, one or more storage service providers. The local file systemstores local user files (the data) in their native form in cache 208.Reference numeral 210 represents that portion of the cache that storespieces of metadata (the structured data representations, as will bedescribed) that are exported to the back-end data store (e.g., thecloud).

FIG. 3 is a block diagram illustrating how the interface may be usedwith different types of local file system architectures. In particular,FIG. 3 shows the CCS (in this drawing a Web-based portal) controllingthree (3) FSA instances. Once again, these examples are merelyrepresentative and they should not be taken to limit the invention. Inthis example, the file system agent 306 is used with three (3) differentlocal file systems: NTFS 300 executing on a Windows operating systemplatform 308, MacFS (also referred to as “HFS+” (HFSPlus)) 302 executingon an OS X operating system platform 310, and EXT3 or XFS 304 executingon a Linux operating system platform 312. These local file systems maybe exported (e.g., via CIFS, AFP, NFS or the like) to create a NASsystem based on VFS. Conventional hardware, or a virtual machineapproach, may be used in these implementations, although this is not alimitation. As indicated in FIG. 3, each platform may be controlled froma single CCS instance 314, and one or more external storage serviceproviders may be used as an external object repository 316. As notedabove, there is no requirement that multiple SSPs be used, or that thedata store be provided using an SSP.

FIG. 4 illustrates the interface implemented as an appliance within alocal processing environment. In this embodiment, the local file systemtraffic 400 is received over Ethernet and represented by the arrowidentified as “NAS traffic.” That traffic is provided to smbd layer 402,which is a SAMBA file server daemon that provides CIFS (Windows-based)file sharing services to clients. The layer 402 is managed by theoperating system kernel 404 is the usual manner. In this embodiment, thelocal file system is represented (in this example) by the FUSE kernelmodule 406 (which is part of the Linux kernel distribution). Components400, 402 and 404 are not required to be part of the appliance. The filetransfer agent 408 of the interface is associated with the FUSE module406 as shown to intercept the read/write events as described above. TheCCS (as described above) is implemented by a pair of modules (which maybe a single module), namely, a cache manager 410, and a volume manager412. Although not shown in detail, preferably there is one file transferagent instance 408 for each volume of the local file system. The cachemanager 410 is responsible for management of “chunks” with respect to alocal disk cache 414. This enables the interface described herein tomaintain a local cache of the data structures (the structured datarepresentations) that comprise the versioned file system. The volumemanager 412 maps the root of the FSA data to the cloud (as will bedescribed below), and it further understands the one or more policies ofthe cloud storage service providers. The volume manager also providesthe application programming interface (API) to these one or moreproviders and communicates the structured data representations (thatcomprise the versioned file system) through a transport mechanism 416such as cURL. cURL is a library and command line tool for transferringfiles with URL syntax that supports various protocols such as FTP, FTPS,HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS and FILE. cURLalso supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTPform based upload, proxies, cookies, user+password authentication, filetransfer resume, proxy tunneling, and the like. The structured datarepresentations preferably are encrypted and compressed prior totransport by the transformation module 418. The module 418 may provideone or more other data transformation services, such as duplicateelimination. The encryption, compression, duplicate elimination and thelike, or any one of such functions, are optional. A messaging layer 420(e.g., local socket-based IPC) may be used to pass messages between thefile system agent instances, the cache manager and the volume manager.Any other type of message transport may be used as well.

The interface shown in FIG. 4 may be implemented as a standalone system,or as a managed service. In the latter case, the system executes in anend user (local file system) environment. A managed service providerprovides the system (and the versioned file system service), preferablyon a fee or subscription basis, and the data store (the cloud) typicallyis provided by one or more third party service providers. The versionedfile system may have its own associated object-based data store, butthis is not a requirement, as its main operation is to generate andmanage the structured data representations that comprise the versionedfile system. The cloud preferably is used just to store the structureddata representations, preferably in a write-once manner, although the“versioned file system” as described herein may be used with anyback-end data store.

As described above, the file system agent 408 is capable of completelyrecovering from the cloud (or other store) the state of the native filesystem and providing immediate file system access (once FSA metadata isrecovered). The FSA can also recover to any point-in-time for the wholefile system, a directory and all its contents, a single file, or a pieceof a file. These and other advantages are provided by the “versionedfile system” of this disclosure, as it now described in more detailbelow.

For more details concerning the filer as described above, the disclosureof U.S. Pat. No. 9,575,841 is hereby incorporated by reference.

FIG. 5 is a block diagram that illustrates a system 500 for managing aversioned file system (as described above) that also includes thecapability of global locking. The system 500 includes an interface 510in communication with local traffic 520, a web-based portal 530, a localcache 540, a lock server 550, and cloud storage 560. The interface 510includes a SMBD layer 502, a NFSD layer 504, a FUSE module 506, a FSA508, a cache manager 512, a volume manager 514, a lock daemon 516, atransport layer 518, and an administrative module 522. In someembodiments, the interface 510 is the same as the interface describedwith respect to FIG. 4 but with the addition of the lock daemon 516.

SMB/CIFS lock requests are intercepted by SMBD layer 502, which is aSAMBA file server daemon. An optional Virtual File System (VFS) modulecan extend the SAMBA server daemon to send the local lock information tothe FSA 508. FSA 508 then communicates with FUSE 506 to coordinate theFUSE file descriptors (pointers) with the ioctl information to determinea path for the given file(s) associated with the lock request. Assuminga path is enabled for global locking, FSA 508 sends the lock and path tothe lock daemon 516, which handles the lock request as described below.If a path is not enabled for global locking, the lock request stayswithin the SAMBA server as it did previously (e.g., conflict management,etc. as described above) and it is not sent to the lock daemon 516.

NFS lock requests are passed through the NFSD layer 504 to FUSE 506.Assuming a path prefix is enabled for global locking, FSA 508communicates with the lock daemon 516 to handle the lock request using acommon protocol, as described above. If the path prefix is not enabledfor global locking, FSA 508 handles the lock request as it didpreviously (e.g., conflict management, etc. as described above) and thelock request is not sent to the lock daemon 516.

The lock daemon 516 is responsible for local lock management andcoordinating with the global lock server. The lock daemon 516 canperform one or more of the following functions: (a) translating the lockformat; (b) communicating with the centralized lock server; (c)acquiring locks; (d) lock peeking; (e) lock re-acquiring; (f) lockreleasing; and (g) communicating with the filer.

With respect to translating the lock format, the lock daemon 516 cantranslate the local file lock requests to a common lock formatunderstood by the centralized lock server 550 (described below). Usingthis approach, the lock server 550 receives a lock request in one formatregardless of the underlying network protocol (e.g., SMB/CIFS or NFS).The centralized lock server 550 can be in a network operations center(NOC) 555.

The lock daemon 516 can then communicate with the centralized lockserver 550 by making calls to a Centralized Lock API. Through the API,the lock daemon 516 can execute a lock request, an unlock request,and/or a lock break request. A lock request generally requires thetransmission of certain information such as the first handle (a uniqueidentifier to the original base object for the file), the requested lockmode, the file path, the protocol of the requester, etc. Additionalinformation such as timestamps and serial number can be included in thelock request. The requested lock mode is the type of access for thelock, such as a shared or exclusive lock, a lock for read, a lock forwrite, lock for exclusive write, lock for shared write. If thecentralized lock server 550 grants the lock request, the lock server 550then uses information provided in the lock request (e.g., the firsthandle) to retrieve the latest version of the requested file from cloudstorage 560. The centralized lock server 550 transmits the latestversion of the requested file to the lock daemon 516, which can storethe file in local cache 540.

An unlock request can include the same or similar information as thelock request but with an updated handle name that was generated as aresult of modifications to the locked file. A lock break request can beprovided by a system administrator to manually unlock a file (e.g., if auser leaves a locked file open overnight, a server goes down, etc.).

Prior to making a new lock request, the lock daemon 516 determineswhether a lock already exists in local cache 540 or on the centralizedlock server 550. If no lock exists in either of those locations, thelock daemon 516 acquires a new lock through the centralized lock server550. The new lock can have a lock mode computed using the requestedaccess and share profiles (masks).

Lock peeking can be initiated every time a file is opened for read. Inlock peeking, the lock daemon 516 can query whether a lock exists on thefile prior to opening the file. If a lock exists, the lock daemon 516can also determine the associated lock mode to evaluate whether the lockmode permits the user to open the file. The lock daemon 516 retrievesthis information from local lock cache 540 if the filer requesting thelock peek already has a write lock on the file. Otherwise, the lockdaemon 516 retrieves this information from the centralized lock server550. Each lock peek request can be cached in the local lock cache 540for a short time period (e.g., several seconds) to reduce traffic to thecentral lock server 550 if the lock daemon 516 receives a new lock peekrequest shortly after the first lock peek request.

For example, another user may have a lock for exclusive write access tothe file that does not allow any shared access (i.e., no shared readaccess). In this example, the lock daemon 516 determines from the lockquery that the file cannot be opened due to an existing lock on thefile. In another example, the lock mode can allow shared read or writeaccess in which case the lock daemon 516 determines from the lock querythat the file can be opened.

During lock peeking, the lock daemon 516 can also retrieve additionalinformation about the file, such as the file handle, handle version,first handle, and lock push version. The file handle is a pointer to thelatest version of the file in the cloud. The handle version is a versionof the file in the cloud. The first handle provides a unique identifierto the file across versions and renames of the file. The lock pushversion is the latest version of the file that was sent to the cloud.

The lock deamon 516 can cache locks and unlocks in a local lock cache540 for release to the centralized lock server 550. If a lock request ismade for a file that has a cached unlock request, the lock can bereestablished without having to acquire a new lock from the centralizedlock server 550. In such a situation, the unlock request is cancelled.This caching can reduce load on the lock server 550 and improve responsetime. In general, the unlock requests are cached for a certain period oftime prior to release to the lock server 550 to allow for such lockreestablishment.

As discussed above, the lock request includes information on theprotocol (e.g., SMB/CIFS or NFS) of the requester and the lock mode. Thelock server 550 receives this information and can determine, based onany existing lock(s) on the requested file, whether the lock server 550can issue multiple locks on the same file. The lock server 550 canevaluate the protocol used by the requester of the existing lock and theassociated access/share permissions of that lock and determine whetherprotocol used with the new lock requester is compatible.

In addition, the lock daemon 516 handles lock releases. In someembodiments, the lock daemon 516 does not immediately send the lockrelease to the lock server 550. This time delay can reduce load on thecentralized lock server 550 because files are frequently locked andunlocked in rapid succession, as discussed above. Before a lock isreleased, if the file was changed, the current data is sent to cloudstorage 560 (e.g., Amazon S3, Microsoft Azure, or other public orprivate clouds) so the most recent data is available to the next locker.

Finally, the lock daemon 516 can communicate with the FSA 508. The lockdaemon 516 can receive lock requests and/or lock peek requests from FSA508, which the lock daemon 516 translates into a common protocol fortransmission to the centralized lock server 550, as discussed above. Thelock daemon can also pass the updated handle name to the FSA 508 toperform a file-level snapshot before unlocking a file and/or a filelevel merge/synchronization before locking a file.

For global locking, it is desirable for the locker to have the mostrecent version of the file associated with the lock request (and lockgrant). To accomplish this, the cache manager 512 can be configured tosnapshot a single file (e.g., the file associated with the lock request)without triggering a copy-on-write (COW) event (which would cause aversion update, as discussed above) and without affecting other snapshotoperations. After a single file snapshot, the cache manager 512 can markall parent directories of the file as changed or “dirty.” In addition,the fault manager algorithm can be configured to fault a single filebased on requests from the FSA 508.

The merge/push algorithm can be modified to provide for merging singlefiles. Before the locked file is pushed to the local cache 540, the NOC555 assigns a unique lock version (e.g., 64 bit) to the file. The lockversion can be used by FSA 508 to determine whether a locked file or itsmetadata is dirty (i.e., changed). The parent directories of the lockedfile can continue to use the existing write version assigned from thelast TOC. Thus, FSA 508 can track two values: lock_write_version andlock_push_version. When a file or directory is dirtied, thelock_write_version is updated. When a file or directory is pushed tolocal cache 540, the lock_push_version is updated.

As discussed above, the file data from the NOC 555 (or centralized lockserver 550) is merged into the local cache 540 before the FSA 508returns control of the file to the client. To determine if the file datain the NOC 555 is newer than the file data in the cache 540 (e.g., ifthe lock is retrieved while an unlock request is cached), the FSA checksMAX (lock_write_version, lock_push_version) against the NOC lockversion. If the NOC lock version is greater than the lock_write_versionand the lock_push_version, the file data (object metadata and data) fromthe NOC 555 is used to instantiate the object (locked file) in the localcache 540. If the file data in the cache 540 is newer, then the filedata from the NOC 555 is discarded. In the circumstance where the NOC555 indicates that the file is deleted, the delete version is comparedto the local cache 540 version in order to apply the delete to the localcache 540.

In addition, the merge/push algorithm can be modified to reconcile thesingle-file merges of locked files with the snapshot merges of files.Any file that was “fastsynched” through the FSA 508 (i.e., locked) or“fastpushed” to the cloud (i.e., unlocked) is designated as “cloudfastsynced.” When merging an object or file that is considered “clouddirty” or “cloud fastsynched,” the FSA 508 will update the file if theincoming lock_push_version is greater than MAX (lock_write_version,lock_push_version), as discussed above. If the incominglock_push_version is less than MAX (lock_write_version,lock_push_version), the cache object is considered newer and theincoming update is discarded by the FSA 508. Also, when a file ismissing (deleted) from the pushed version but the file is also locallyfastsynched, the file will not be deleted. This merging can occurconcurrently or before the global lock on the file is granted.

In addition, if a file has been deleted or renamed, the local cachemetadata can record a “delete tombstone” which includes certaininformation (e.g., parent first handle, lock version, name, etc.). FSA508 merges a file as new if the file is newer than any delete tombstonecontained in the cache for the unique file. This can address thesituation in which a file has been fast synchronized before merge. Inthat case, the incoming cloud dirty file is old compared to the cacheand the import is discarded.

To ensure that the unlocked file includes the changes from the latestversion, the locked file can only be unlocked when the lock_push_versionis greater than or equal to the lock_write_version at which point theFSA 508 sends the lock_push_version back to the NOC 555 (or centralizedlock server 550) to store the new version of the file in cloud storage560.

In some embodiments, the interface 510 snapshots and merges new files atthe time of creation. The new file requests can be stored on the lockserver 550 with the lock entries. Other users can poll the lock server550 to determine if new files/objects exist that have not yet beenpopulated to the cloud 560, for example if there are new files/objectsin a given directory. After the new files have been created, the lockerserver 550 can merge the new file requests into the appropriatedirectories in the cloud 560.

The filers may be anywhere geographically, and no network connectivitybetween or among the filers is required (provided filers have aconnection to the service).

Sharing enables multi-site access to a single shared volume. The data inthe volume is 100% available, accessible, secure and immutable. Theapproach has infinite scalability and eliminates local capacityconstraints. The sites (nodes) may comprise a single enterpriseenvironment (such as geographically-distributed offices of a singleenterprise division or department), but this is not a requirement, asfilers are not required to comprise an integrated enterprise. Thisenables partners to share the filesystem (and thus particular volumestherein) in the cloud. Using the service provider-supplied interfaces,which are preferably web-based, the permitted users may set up a sharinggroup and manage it. Using the sharing approach as described, eachmember of the sharing group in effect “sees” the same volume. Thus, anypoint-in-time recovery of the shared volume is provided, and fullread/write access is enabled from each node in the sharing group.

Reshapable Caching

RAID 0 (disk striping) is the process of dividing a body of data intoblocks and spreading the data blocks across multiple storage devices,such as hard disks or solid-state drives (SSDs), in a redundant array ofindependent disks (RAID) group. A stripe consists of the data dividedacross the set of hard disks or SSDs, and a striped unit refers to thedata slice on an individual drive.

According to this disclosure, a new type of caching scheme isimplemented, referred to as “reshapable” caching. Like striped caches,the approach uses a stripe, but the striping is implemented via a trueRAID 0 rather than as a striped LV (logical volume) device. Thisapproach allows for a “reshape” operation to convert from a n-way stripeset to a n+l-way stripe set. Preferably, a reshape involvesredistributing each block on disk to its new calculated home. Forexample, going from a single disk to a two disk set would move everyother block from disk 1 to disk 2, and rearrange the blocks on disk 1 tofill in the “holes”. Performance after the reshape matches that of astriped cache.

A preferred technique works as follows. FIG. 6 depicts these operations.

The process begins on first boot of a virtual machine (VM). At step 600,all free devices are enumerated. At step 602, a smallest disk is thenassigned to be a copy-on-write (COW) disk. An n-way stripe over allremaining disks, using as much of those disks as possible, is thencreated at step 604. This approach handles a common one-cache one-COWcase automatically. In particular, the single disk cache is a RAID0 witha single device in it. It does not handle the case where the requirement(for example) is for a 200 GB cache made up of, say, 4 50 GB disks, anda 100 GB COW. In that case, one solution would be to provide a 200 GBcache made up of 3 50 GB disks, a 100 GB disk that is halfway used, anda 50 GB COW. An algorithm may also be implemented to see if there aremultiple disks of the same size, which then are pooled for the cache andthen taking any outlier as the COW, or failing to find an outlier,taking one of the pool disks.

When a new device that will be striped is added alongside the otherdevices, an add-a-disk process is executed. This is step 606. To thisend, the device is added via a command mdadm grow. The command vgextendis executed to pick up the new space in the storage VG. A reboot is theninitiated.

To mount the cache, a mount-a-disk process (i.e. run at boot time) isexecuted. This is step 608. In particular, the number of devices arecounted, and a correct stripe width (swidth) parameter is derived. Thecache is then mounted with the correct swidth. A grow-a-disk process isthen executed.

The grow-a-disk process (i.e. making one or more of the existing diskslarger) is step 610. In particular, command mdadm is executed to grow toextend the RAID 0 to its maximum size. A warning is logged if there iswasted space (i.e. the 4 TB+4 TB+6 TB example above). Then, commandpvresize is executed to size the RAID 0 to its maximum size, andlvresize the cache to its maximum size. The command xfs_growfs is thenexecuted to expand the XFS filesystem into the new space.

The above-identified commands are Linux operating system (OS) kernelcommands.

The above-described processes (e.g., operations 600-610) are implementedin software executed by one or more processors.

The technique herein provides significant advantages. New devices can beadded so customers can grow the cache as needs grow. There is aper-hypervisor disk count limit, but it is large. Existing devices canbe expanded at any time, up until the per-hypervisor limit. Betterperformance than can be achieved with a single cache disk or a set ofscalable cache disks. Customers can set this up on their own withoutsupport/Professional Services (PS) assistance. The filer can be onlineand serving clients during the add operation. New devices can be addedin a quantity without being a multiple of the stripe width. There is no“initial” striping step—any cache can have additional devices added toit, even with the cache already in use.

When a customer sets up a filer, the cache on the filer is provisionedin a particular manner to facilitate the cache reshaping according tothis disclosure. In particular, the filer cache is provisioned (as aminimal configuration) either as a single disk RAID 0, or a degradedRAID 4. Normally, the cache is configured as a logical volume overlayinga logical volume group on top of a physical volume. With this additionalprovisioning, the single disk RAID 0 or degraded RAID 4 support is madeavailable if and when later needed as an improved alternative to thebasic physical volume. To that end, when the customer then adds anotherdisk, the filer receives an indication that the new disk has been added,and the cache reshaping is carried out by the filer as needed. The cachereshaping occurs without the customer having to erase and re-load itsdata, so can be done “live” while the filer continues serving user data.

Stated another way, the technique herein (involving initial provisioningof the cache as single disk RAID 0 or degraded RAID 4, and the automatedcache reshaping that occurs in response to receipt of an indication ofthe customer adding a disk) enables the customer's data in the filercache to be automatically re-organized to better utilize the new disktogether with the existing disk(s), and much more efficiently ascompared to the alternative of simply concatenating storage (disks).

Variants:

The grow-a-disk process may be done live and without rebooting, byincluding code to scan the disk SCSI bus and trigger grow-a-disk if anyof the disk sizes change. Many hypervisors (including VMware) allowchanging disk sizes without powering off the virtual machine first). Forexample, do a blockdev on each cache device. Rescan the SCSI bus via‘echo “- - -” >/sys/class/scsi_host/host#/scan’ or similar. Do anotherblockdev on each cache device. If the before and after results differ,run grow-a-disk.

While the above describes a particular order of operations performed bycertain embodiments of the disclosed subject matter, it should beunderstood that such order is exemplary, as alternative embodiments mayperform the operations in a different order, combine certain operations,overlap certain operations, or the like. References in the specificationto a given embodiment indicate that the embodiment described may includea particular feature, structure, or characteristic, but every embodimentmay not necessarily include the particular feature, structure, orcharacteristic.

While the disclosed subject matter has been described in the context ofa method or process, the subject matter also relates to apparatus forperforming the operations herein. This apparatus may be speciallyconstructed for the required purposes, or it may comprise a computerselectively activated or reconfigured by a computer program stored inthe computer. Such a computer program may be stored in a computerreadable storage medium, such as, but is not limited to, any type ofdisk including an optical disk, a CD-ROM, and a magnetic-optical disk, aread-only memory (ROM), a random access memory (RAM), a magnetic oroptical card, or any type of media suitable for storing electronicinstructions, and each coupled to a computer system bus. Acomputer-readable medium having instructions stored thereon to performthe interface functions is tangible.

A given implementation of the disclosed subject matter is softwarewritten in a given programming language that runs on a server on anIntel-based hardware platform running an operating system such as Linux.As noted above, the interface may be implemented as well as a virtualmachine or appliance, or in any other tangible manner.

While given components of the system have been described separately, oneof ordinary skill will appreciate that some of the functions may becombined or shared in given instructions, program sequences, codeportions, and the like.

In the preferred approach as described, filers do not communicatedirectly with one another but, instead, communicate through ahub-and-spoke architecture. Thus, the notification mechanism typicallyleverages the intermediary (e.g., NMC) for passing the queries andresponses, as has been described. In an alternative embodiment, anddepending on the underlying architecture, some filer-to-filercommunication may be implemented.

Having described the subject matter, what is claimed is as follows.

The invention claimed is:
 1. A method to provide storage to anenterprise, comprising: providing a filer configured to be hosted on aphysical or virtual machine associated with the enterprise, the filerbeing configured to represent, to the enterprise, a local file systemwhose data is stored in an object store associated with a cloud-basedstorage service provider; configuring a cache in the filer, the cacheinitially provisioned with a minimal configuration corresponding to asingle disk RAID 0 or degraded RAID 4; reshaping the cache by: receivingan indication that a new disk is associated with a physical or virtualmachine, and in response to receiving the indication, automaticallyre-organizing data in the cache to utilize the new disk efficiently,thereby reshaping the cache; wherein provisioning the cache with theminimal configuration enables the reshaping to be performed withouterasing and re-loading the data in the cache and without requiring apause in service during reshaping.
 2. The method as described in claim 1wherein reshaping is implemented upon a first boot of the physical orvirtual machine.
 3. The method as described in claim 1 wherein the filerautomatically reorganizes data by: enumerating all free disks associatedwith the physical or virtual machine; assigning a smallest of the freedisks as a copy-on-write (COW) disk; and performing an n-way stripe overall remaining free disks, using as much of those disks as possible. 4.The method as described in claim 1 further including growing a size ofan existing disk in the cache.
 5. A computer program product in anon-transitory computer-readable media, the computer program productproviding a filer configured to be hosted and executed on a physical orvirtual machine associated with the enterprise, the filer beingconfigured to represent, to the enterprise, a local file system whosedata is stored in an object store associated with a cloud-based storageservice provider, the computer program product comprising program codeconfigured to: instantiate a cache, the cache initially provisioned witha minimal configuration corresponding to a single disk RAID 0 ordegraded RAID 4; and reshape the cache by: receiving an indication thata new disk is associated with a physical or virtual machine, and inresponse to receiving the indication, automatically re-organizing datain the cache to utilize the new disk efficiently, thereby reshaping thecache; wherein provisioning the cache with the minimal configurationenables the reshaping to be performed without erasing and re-loading thedata in the cache and without requiring a pause in service duringreshaping.
 6. The computer program product as described in claim 5wherein the program code configured to reshape the cache is implementedupon a first boot of the physical or virtual machine.
 7. The computerprogram product as described in claim 5 wherein the program codeconfigured to automatically reorganize data includes program codeconfigured to: enumerate all free disks associated with the physical orvirtual machine; assign a smallest of the free disks as a copy-on-write(COW) disk; and perform an n-way stripe over all remaining free disks,using as much of those disks as possible.
 8. The computer programproduct as described in claim 5 further including program code to grow asize of an existing disk in the cache.